passthrough: streamline _hvm_dirq_assist()
authorJan Beulich <jbeulich@suse.com>
Tue, 16 Sep 2014 11:56:45 +0000 (13:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 16 Sep 2014 11:56:45 +0000 (13:56 +0200)
commit5fb75513e25e9a135df3fd92b35ad749ec7cf7cb
treef3877d4424129696213b292cd00c4fe039e46baa
parentff512a29052a6e44bbc703a58ef419d1e6333cd5
passthrough: streamline _hvm_dirq_assist()

The loop inside this function was calling two functions with loop-
invariable arguments which clearly don't need calling more than once:
send_guest_pirq() and __msi_pirq_eoi(). After moving these out of the
loop it further became apparent that folding the hvm_pci_msi_assert()
helper into the main function can further help readability.

In the course of this I noticed that __hvm_dpci_eoi() called
hvm_pci_intx_deassert() unconditionally, whereas hvm_pci_intx_assert()
(correctly) got called only when !hvm_domain_use_pirq(), so the former
is being made conditional now too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/io.c